The present invention relates generally to signal conversion, and more particularly, to a level sensitive comparing device which ensures a square wave output of good quality.
Generally, a comparator is not level-sensitive such that a related-art clock extractor based on the non-level-sensitive comparator cannot ensure an output waveform is always an ideal square wave when a peak value of an input signal drops below a certain level. Such problem may be solved if the clock extractor is made to output a low level when the peak value of the input signal goes below a predetermined level.
A related art solution to address this problem is illustrated in FIG. 1. A level sensitive comparing device 100 is used to convert a sinusoidal wave or a near sinusoidal input wave to a square wave output. The level sensitive comparing device 100 includes a main comparator 110 which converts the sinusoidal wave input to the square wave output. A first-order RC high-pass filter 150 is used to change a DC level of the sine wave at IN to a desired one at an input of the comparator 110. A peak detector circuit 130 is used to determine a peak value of the input sine wave. The comparator 120 compares the peak value of the input sine wave with a reference voltage VO. If the peak value of the input sine wave falls below VO, the comparator 120 outputs a low level signal and the square wave output from the comparator 110 is prevented from reaching an terminal OUT by an AND gate 140. Otherwise, the comparator 120 outputs a high-level signal and the square wave output from the comparator 110 is passed to the terminal OUT by the AND gate 140.
A disadvantage of the above-mentioned level sensitive comparing circuit is the design of the peak detector 130. Since the peak detector is an analog circuit, requiring rectifiers (implemented with operational amplifiers) and capacitors to hold the peak value, a large area is required for integration of such circuits. Therefore, there is a need to provide a different level sensitive comparing circuit to address the problem encountered in the related art.